using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.ObjectBuilder;
using Microsoft.Practices.CompositeWeb;
using System.Transactions;
using GC2.Entities.Logistica;
using GC2.ExceptionHandler.Services;
using GC2.DataAccess.DALogistica;

namespace GC2.Bussines.BMLogistica
{
    public class BMRemitosLDet
    {
        public BMRemitosLDet(string coneccion)
        {
            this.Connection = coneccion;
        }

        private string connection = "";
        public string Connection
        {
            get { return connection; }
            set { connection = value; }
        }

        DARemitosLDet daRemitosLDet = new DARemitosLDet();

        #region BMRemitosLDetInsert
        public void BMRemitosLDetInsert(RemitosLDet remitoLDet)
        {
            try
            {
                daRemitosLDet.DARemitosLDetInsert(Connection, remitoLDet);
            }
            catch (Exception ex)
            {
                ExceptionBM exNew = new ExceptionBM();
                throw new System.Exception(exNew.exBM(ex.ToString()).ToString());
            }
        }
        #endregion

        #region BMRemitosLDetGetAll
        public List<RemitosLDet> BMRemitosLDetGetAll(RemitosLDet remitoLDet)
        {
            List<RemitosLDet> listaRemitosLDet = new List<RemitosLDet>();
            try
            {
                listaRemitosLDet = daRemitosLDet.DARemitosLDetGetAll(Connection, remitoLDet);
            }
            catch (Exception ex)
            {
                ExceptionBM exNew = new ExceptionBM();
                throw new System.Exception(exNew.exBM(ex.ToString()).ToString());
            }
            return listaRemitosLDet;
        }
        #endregion

        #region BMRemitosLDetDelete
        public void BMRemitosLDetDelete(RemitosLDet remitoLDet)
        {
            try
            {
                daRemitosLDet.DARemitosLDetDelete(Connection, remitoLDet);
            }
            catch (Exception ex)
            {
                ExceptionBM exNew = new ExceptionBM();
                throw new System.Exception(exNew.exBM(ex.ToString()).ToString());
            }
        }
        #endregion
    }
}




